abstract class Animal {
  void eat ();
}

abstract class Mammal extends Animal {
  void eat () {
    print('can eat');
  }
}
abstract class Bird extends Animal {
  void eat () {
    print('can eat');
  }
}
abstract class Fish extends Animal {
  void eat () {
    print('can eat');
  }
}

// 爬行
abstract class Walker{
  // This class is intended to be used as a mixin, and should not be
  // extended directly.
  factory Walker._() => null;

  void walk() {
    print("I'm walking");
  }
}
// 游泳
abstract class Swimmer{
  // This class is intended to be used as a mixin, and should not be
  // extended directly.
  factory Swimmer._() => null;

  void swim() {
    print("I'm swimming");
  }
}
// 飞行
abstract class Flyer{
  // This class is intended to be used as a mixin, and should not be
  // extended directly.
  factory Flyer._() => null;

  void fly() {
    print("I'm flying");
  }
}

class Dolphin extends Mammal with Swimmer {}

class Bat extends Mammal with Walker, Flyer{}

class Cat extends Mammal with Walker {}

class Dove extends Bird with Walker, Flyer {}

class Duck extends Bird with Walker, Swimmer, Flyer {}

class Shark extends Fish with Swimmer {}

class FlyingFish extends Fish with Swimmer, Flyer {}



runMinxin () {
  var cat = Cat();
  print('------------- minxin ---------------');
  cat.eat();
}
